//
// Created by 吴锐 on 2022/2/25.
//

#include "iostream"

using namespace std;

class Building;

class GoodGay {
public:
    Building* building;

    void visit();

    GoodGay();
};

class Building {
    friend class GoodGay;

public:
    string sittingRoom;

private:
    string bedRoom;

public:
    Building();
};

Building::Building() {
    sittingRoom = "客厅";
    bedRoom = "卧室";
}

GoodGay::GoodGay() {
    building = new Building;
}

void GoodGay::visit() {
    cout << "好基友类正在访问: " << building->sittingRoom << endl;
    cout << "好基友类正在访问: " << building->bedRoom << endl;
}

void test01(){
    GoodGay gg;
    gg.visit();
}

int mian(){
    test01();
    return 0;
}